package com.lxx.consumer.feign;

import com.lxx.consumer.feign.fallback.ProductFallback;
import com.lxx.consumer.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author liuxing
 * @create 2022-08-27 1:13
 */
@FeignClient(value = "product-service",fallback = ProductFallback.class)
public interface ProductFeign {

    @GetMapping("/product/user/{id}")
    User getUserById(@PathVariable("id") Long id);
}
